package com.star.spring.dubbo.provider;

import lombok.extern.slf4j.Slf4j;

import com.star.spring.dubbo.api.GreetingService;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.rpc.RpcContext;

@Slf4j
@DubboService
public class GreetingServiceImpl implements GreetingService {
    @Override
    public String sayHello(String name) {
        log.info("Hello " + name + ", request from consumer: " + RpcContext.getContext().getRemoteAddress());
        return "Hello, " + name;
    }

}


